﻿package emusic.api.adapters 
{
	import emusic.ws.PaginationInfo;
	
	/**
	 * ...
	 * @author Martin Legris ( http://blog.martinlegris.com )
	 */
	public class PaginationAdapter
	{
		public static function digestPagination(pagination:XML):PaginationInfo
		{
			var data:PaginationInfo = new PaginationInfo();
			data.page = parseInt(pagination.@page);
			data.pages = parseInt(pagination.@pages);
			data.perPage = parseInt(pagination.@perPage);
			data.total = parseInt(pagination.@total);
			
			return data;
		}
	}
}